home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / os2 / entrtan2.arj / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1994-02-09  |  6KB  |  190 lines

  1. /* Entertainment Pack for OS/2 Installation */
  2. '@Echo Off'
  3. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  4. Call SysLoadFuncs
  5. Signal On Failure Name FAILURE
  6. Signal On Halt Name HALT
  7. Signal On Syntax Name SYNTAX
  8. Call SysCls
  9. Say 'Installing Entertainment Pack for OS/2...'
  10. Say ''
  11. Result = SysFileTree( 'BG.EXE', 'Files', 'F' )
  12. If Files.0 = 0 Then
  13.   Do
  14.   Say 'ERROR: BG.EXE not found! Installation cancelled.'
  15.   Signal DONE
  16.   End
  17. Result = SysFileTree( 'BG.HLP', 'Files', 'F' )
  18. If Files.0 = 0 Then
  19.   Do
  20.   Say 'ERROR: BG.HLP not found! Installation cancelled.'
  21.   Signal DONE
  22.   End
  23. Result = SysFileTree( 'FOUR.EXE', 'Files', 'F' )
  24. If Files.0 = 0 Then
  25.   Do
  26.   Say 'ERROR: FOUR.EXE not found! Installation cancelled.'
  27.   Signal DONE
  28.   End
  29. Result = SysFileTree( 'FOUR.HLP', 'Files', 'F' )
  30. If Files.0 = 0 Then
  31.   Do
  32.   Say 'ERROR: FOUR.HLP not found! Installation cancelled.'
  33.   Signal DONE
  34.   End
  35. Result = SysFileTree( 'MASTER.EXE', 'Files', 'F' )
  36. If Files.0 = 0 Then
  37.   Do
  38.   Say 'ERROR: MASTER.EXE not found! Installation cancelled.'
  39.   Signal DONE
  40.   End
  41. Result = SysFileTree( 'MASTER.HLP', 'Files', 'F' )
  42. If Files.0 = 0 Then
  43.   Do
  44.   Say 'ERROR: MASTER.HLP not found! Installation cancelled.'
  45.   Signal DONE
  46.   End
  47. Result = SysFileTree( 'OTHELLO.EXE', 'Files', 'F' )
  48. If Files.0 = 0 Then
  49.   Do
  50.   Say 'ERROR: OTHELLO.EXE not found! Installation cancelled.'
  51.   Signal DONE
  52.   End
  53. Result = SysFileTree( 'OTHELLO.HLP', 'Files', 'F' )
  54. If Files.0 = 0 Then
  55.   Do
  56.   Say 'ERROR: OTHELLO.HLP not found! Installation cancelled.'
  57.   Signal DONE
  58.   End
  59. Result = SysFileTree( 'PEGGED.EXE', 'Files', 'F' )
  60. If Files.0 = 0 Then
  61.   Do
  62.   Say 'ERROR: PEGGED.EXE not found! Installation cancelled.'
  63.   Signal DONE
  64.   End
  65. Result = SysFileTree( 'PEGGED.HLP', 'Files', 'F' )
  66. If Files.0 = 0 Then
  67.   Do
  68.   Say 'ERROR: PEGGED.HLP not found! Installation cancelled.'
  69.   Signal DONE
  70.   End
  71. Result = SysFileTree( 'TIC.EXE', 'Files', 'F' )
  72. If Files.0 = 0 Then
  73.   Do
  74.   Say 'ERROR: TIC.EXE not found! Installation cancelled.'
  75.   Signal DONE
  76.   End
  77. Result = SysFileTree( 'TIC.HLP', 'Files', 'F' )
  78. If Files.0 = 0 Then
  79.   Do
  80.   Say 'ERROR: TIC.HLP not found! Installation cancelled.'
  81.   Signal DONE
  82.   End
  83. Result = SysFileTree( 'LICENSE.TXT', 'Files', 'F' )
  84. If Files.0 = 0 Then
  85.   Do
  86.   Say 'ERROR: LICENSE.TXT not found! Installation cancelled.'
  87.   Signal DONE
  88.   End
  89. Result = SysFileTree( 'ENTRTAIN.DOC', 'Files', 'F' )
  90. If Files.0 = 0 Then
  91.   Do
  92.   Say 'ERROR: ENTRTAIN.DOC not found! Installation cancelled.'
  93.   Signal DONE
  94.   End
  95. Say 'Please enter the full name of the directory to which you want'
  96. Say 'the Entertainment Pack for OS/2 installed (default C:\OS2\APPS): '
  97. Pull Directory
  98. If Directory = "" Then Directory = 'C:\OS2\APPS'
  99. Result = SysFileTree( Directory, 'Dirs', 'D' )
  100. If Dirs.0 = 0 Then
  101.   Do
  102.   Result = SysMkDir( Directory )
  103.   if Result == 0 Then
  104.     Do
  105.     End
  106.   Else
  107.     Do
  108.     Say 'ERROR: Unable to create target directory. Installation cancelled.'
  109.     Signal DONE
  110.     End
  111.   End
  112. Say ''
  113. Say 'The program objects will be placed in the Games folder...'
  114. Folder = '<WP_GAMES>'
  115. Say ''
  116. Say 'Copying BG.EXE to' Directory '...'
  117. Copy BG.EXE Directory                  '1>NUL'
  118. Say 'Copying BG.HLP to' Directory '...'
  119. Copy BG.HLP Directory                  '1>NUL'
  120. Say 'Copying FOUR.EXE to' Directory '...'
  121. Copy FOUR.EXE Directory                  '1>NUL'
  122. Say 'Copying FOUR.HLP to' Directory '...'
  123. Copy FOUR.HLP Directory                  '1>NUL'
  124. Say 'Copying MASTER.EXE to' Directory '...'
  125. Copy MASTER.EXE Directory                  '1>NUL'
  126. Say 'Copying MASTER.HLP to' Directory '...'
  127. Copy MASTER.HLP Directory                  '1>NUL'
  128. Say 'Copying OTHELLO.EXE to' Directory '...'
  129. Copy OTHELLO.EXE Directory                  '1>NUL'
  130. Say 'Copying OTHELLO.HLP to' Directory '...'
  131. Copy OTHELLO.HLP Directory                  '1>NUL'
  132. Say 'Copying PEGGED.EXE to' Directory '...'
  133. Copy PEGGED.EXE Directory                  '1>NUL'
  134. Say 'Copying PEGGED.HLP to' Directory '...'
  135. Copy PEGGED.HLP Directory                  '1>NUL'
  136. Say 'Copying TIC.EXE to' Directory '...'
  137. Copy TIC.EXE Directory                  '1>NUL'
  138. Say 'Copying TIC.HLP to' Directory '...'
  139. Copy TIC.HLP Directory                  '1>NUL'
  140. Say 'Copying LICENSE.TXT to' Directory '...'
  141. Copy LICENSE.TXT Directory                  '1>NUL'
  142. Say 'Copying ENTRTAIN.DOC to' Directory '...'
  143. Copy ENTRTAIN.DOC Directory                  '1>NUL'
  144. Say ''
  145. Say 'Creating program objects...'
  146. Say ''
  147. Type = 'WPProgram'
  148. Title = 'Backgammon'
  149. Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\BG.EXE;STARTUPDIR='Directory';OBJECTID=<BG>;NOPRINT=YES;'
  150. Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  151. If Result = 1 Then
  152.   Title = 'Connect Four'
  153.   Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\FOUR.EXE;STARTUPDIR='Directory';OBJECTID=<FOUR>;NOPRINT=YES;'
  154.   Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  155.   If Result = 1 Then
  156.     Title = 'Master Mind'
  157.     Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\MASTER.EXE;STARTUPDIR='Directory';OBJECTID=<MASTER>;NOPRINT=YES;'
  158.     Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  159.     If Result = 1 Then
  160.       Title = 'Othello'
  161.       Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\OTHELLO.EXE;STARTUPDIR='Directory';OBJECTID=<OTHELLO>;NOPRINT=YES;'
  162.       Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  163.       If Result = 1 Then
  164.         Title = 'Pegged'
  165.         Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\PEGGED.EXE;STARTUPDIR='Directory';OBJECTID=<PEGGED>;NOPRINT=YES;'
  166.         Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  167.         If Result = 1 Then
  168.           Title = 'Tic Tac Toe'
  169.           Parms = 'MINWIN=DESKTOP;PROGTYPE=PM;EXENAME='Directory'\TIC.EXE;STARTUPDIR='Directory';OBJECTID=<TIC>;NOPRINT=YES;'
  170.           Result = SysCreateObject( Type, Title, Folder, Parms, 'ReplaceIfExists' )
  171.           If Result = 1 Then
  172.             Say 'The Entertainment Pack for OS/2 was successfully installed.'
  173.             Say 'Please read ENTRTAIN.DOC for additional information.'
  174.             Exit
  175.  
  176. Say 'ERROR: Unable to create objects. Installation cancelled.'
  177. Exit
  178.  
  179. FAILURE:
  180. Say 'Installation error.'
  181. Signal DONE
  182. HALT:
  183. Say 'Installation error.'
  184. Signal DONE
  185. SYNTAX:
  186. Say 'Installation error.'
  187. Signal DONE
  188. DONE:
  189. Exit
  190.